<template lang="pug">
  keep-alive
    kalix-table(bizKey="building" title='楼宇管理' ref="kalixTable"
    v-bind:tableFields="tableFields"
    v-bind:targetURL="buildingURL"
    v-bind:bizDialog="buildingDialog"
    v-bind:btnList="buildingBtnList"
    v-bind:buttonPermissionPrefix="buttonPermissionPrefix"
    v-bind:toolbarBtnList="toolbarBtnList"
    bizSearch="BuildingSearch")
</template>

<script type="text/ecmascript-6">
  import {KshBuildingURL, buildingBtnPermissionPrefix} from '../config.toml'
  import {buildingConfigBtnList} from './config'
  import KalixTable from '../../../components/corelib/components/common/baseTable'

  export default {
    name: 'kalix-ksh-building',
    components: {KalixTable},
    data() {
      return {
        buildingURL: KshBuildingURL,
        tableFields: [
          {prop: 'uuid', label: '楼宇ID'},
          {prop: 'name', label: '楼宇名称'}
        ],
        buildingDialog: [
          {id: 'add', dialog: 'BuildingAdd'},
          {id: 'view', dialog: 'BuildingView'},
          {id: 'edit', dialog: 'BuildingEdit'}
        ],
        buildingBtnList: buildingConfigBtnList,
        buttonPermissionPrefix: buildingBtnPermissionPrefix,
        toolbarBtnList: [
          {id: 'add', isShow: true, title: '添加', isPermission: true}
        ]
      }
    }
  }
</script>

<style scoped lang="stylus">

</style>
